package com.zxq.kingofbots.controller.ranklist;

import com.alibaba.fastjson2.JSONObject;
import com.zxq.kingofbots.pojo.User;
import com.zxq.kingofbots.service.ranklist.RanklistService;
import org.apache.tomcat.Jar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class RanklistController {
    @Autowired
    private RanklistService ranklistService;

    @GetMapping("/ranklist/user")
    public JSONObject getRankList(@RequestParam Map<String,String> data){
        Integer page = Integer.parseInt(data.get("page"));
        return ranklistService.getRankList(page);
    }
}
